<%--
  Created by IntelliJ IDEA.
  User: ljh
  Date: 2024/10/2
  Time: 9:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored ="false" %>
<%@ taglib prefix="c" uri="jakarta.tags.core" %>

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Yeah</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <meta name="description" content='对你的网站做一个简要的描述'>
    <meta name="keywords" content="Java,Blog">
    <meta property="og:title" content="Yeah" />
    <meta property="og:description" content="对你的网站做一个简要的描述" />
    <meta property="og:image" content="http://120.26.106.52/:8080/avatar.png" />
</head>
<body>
<nav class="navbar navbar-expand-lg bg-body-tertiary">
    <div class="container">
        <a class="navbar-brand" href="<%= request.getContextPath() + "/" %>">Yeah</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
                <li class="nav-item">
                    <a class="nav-link <%= "/resume".equals(request.getAttribute("jakarta.servlet.forward.servlet_path")) ? "active" : "" %>" href="resume">简历</a>
                </li>
                <c:choose>
                    <c:when test="${loginUser == null}">
                        <li class="nav-item">
                            <a class="nav-link <%= "/login".equals(request.getAttribute("jakarta.servlet.forward.servlet_path")) ? "active" : "" %>" href="login1">登录</a>
                        </li>
                    </c:when>
                    <c:when test="${loginUser != null}">
                        <li class="nav-item">
                            <a class="nav-link <%= "/users".equals(request.getAttribute("jakarta.servlet.forward.servlet_path")) ? "active" : "" %>" href="users">用户管理</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="logout">退出</a>
                        </li>
                    </c:when>
                </c:choose>
            </ul>
        </div>
    </div>
</nav>